package com.ruoyi.web.controller.dlxx;




import com.ruoyi.dlxx.domain.Querys;
import com.ruoyi.spy.ArtemisPostTest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/video")
public class ArtemisPost {
	@Resource
	private ArtemisPostTest artemisPostTest;

	/**
	 * 4、API名称：获取监控点预览取流URL
	 * @param querys
	 * @return
	 * @throws Exception
	 */
	@PostMapping("/getUrls")
	@ResponseBody
	public String getUrls(@RequestBody Querys querys)
	{
		String result = artemisPostTest.callPostStringApi(querys);
		return result;
	}

	/**
	 5、API名称：分页获取监控点资源
	 * @param querys
	 * @return
	 * @throws Exception
	 */
	@PostMapping("/getPage")
	@ResponseBody
	public String getPage(@RequestBody Querys querys)
	{
		String result = artemisPostTest.PagePostStringApi(querys);
		return result;
	}

	/**
	 * 6、API名称：获取所有树编码
	 * @return
	 * @throws Exception
	 */
	@PostMapping("/getAllTreeCode")
	@ResponseBody
	public String getAllTreeCode()
	{
		String result = artemisPostTest.GetAllTreeCodeApi();
		return result;
	}

	/**
	 * 7、API名称：根据区域编号获取下一级区域列表
	 * @param querys
	 * @return
	 * @throws Exception
	 */
	@PostMapping("/getsubRegions")
	@ResponseBody
	public String getsubRegions(@RequestBody Querys querys)
	{
		String result = artemisPostTest.subRegionsApi(querys);
		return result;
	}

	/**
	 *  8、API名称：根据区域编号获取下级监控点列表
	 * @param querys
	 * @return
	 * @throws Exception
	 */
	@PostMapping("/getRegionIndexCodeApi")
	@ResponseBody
	public String getRegionIndexCodeApi(@RequestBody Querys querys)
	{
		String result = artemisPostTest.RegionIndexCodeApi(querys);
		return result;
	}


	/**
	 *  9、API名称：获取监控点回放取流URLAPI名称：获取监控点回放取流URL
	 * @param querys
	 * @return
	 * @throws Exception
	 */
	@PostMapping("/getPlaybackURLsApi")
	@ResponseBody
	public String getPlaybackURLsApi(@RequestBody Querys querys)
	{
		String result = artemisPostTest.getPlaybackURLsApi(querys);
		return result;
	}
}
